import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import Home from '../components/Home.vue'
import Welcome from '../components/Welcome.vue'
import UForm from '../components/common/UForm.vue'
import UQuery from '../components/common/UQuery.vue'
import CForm from '../components/common/CForm.vue'
import CQuery from '../components/common/CQuery.vue'
import COwner from '../components/common/COwner.vue'
import Family from '../components/family.vue'
import FForm from '../components/common/FForm.vue'
import FQuery from '../components/common/FQuery.vue'
import FOwner from '../components/common/FOwner.vue'
import SForm from '../components/common/SForm.vue'
import SOwner from '../components/common/SOwner.vue'
import SQuery from '../components/common/SQuery.vue'
import TForm from '../components/common/TForm.vue'
import TOwner from '../components/common/TOwner.vue'
import TQuery from '../components/common/TQuery.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    redirect: '/welcome',
    children: [{
      path: '/welcome',
      name: 'Welcome',
      component: Welcome
    },
    {
      path: '/fform',
      name: 'FForm',
      component: FForm
    },
    {
      path: '/userform',
      name: 'UForm',
      component: UForm
    },
    {
      path: '/storyform',
      name: 'SForm',
      component: SForm
    },
    {
      path: '/userquery',
      name: 'UQuery',
      component: UQuery
    },
    {
      path: '/connectionForm',
      name: 'CForm',
      component: CForm
    },
    {
      path: '/fQuery',
      name: '/FQuery',
      component: FQuery
    },
    {
      path: '/fOwner',
      name: '/FOwner',
      component: FOwner
    },
    {
      path: '/connectionQuery',
      name: 'CQuery',
      component: CQuery
    },
    {
      path: '/connectionOwner',
      name: 'COWner',
      component: COwner
    },
    {
      path: '/sOwner',
      name: 'SOwner',
      component: SOwner
    },
    {
      path: '/sQuery',
      name: 'SQuery',
      component: SQuery
    },
    // {
    //   path: '/connection',
    //   name: 'C',
    //   component: C
    // },
    {
      path: '/tform',
      name: 'TForm',
      component: TForm
    },
    {
      path: '/tOwner',
      name: 'TOwner',
      component: TOwner
    },
    {
      path: '/tQuery',
      name: 'TQuery',
      component: TQuery
    },
    {
      path: '/family',
      name: 'Family',
      component: Family
    }

    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
